<!-- 
 * @Author: guanpf 992093924@qq.om
 * @Date: 2023-07-29 23:58:12
 * @LastEditTime: 2023-10-14 19:03:51
 * @LastEditors: guanpf
 * @Description: 
 * @FilePath: /ZCGL_WX/src/views/main/asset/views/promissoryDetail.vue
 -->
<template>
    <div class="promissory-detail">
        <div class="top">
            <!-- <img :src="info.src" alt="暂无图片"> -->
            <span class="name">{{ info.borrowUserName }}的借据单</span>
        </div>
        <div class="info">
            <div class="label">
                <span class="name">借据编号</span>
                <span class="value">{{ info.orderNo }}</span>
            </div>
            <div class="label">
                <span class="name">提交时间</span>
                <span class="value">{{ info.createTime }}</span>
            </div>
            <div class="label">
                <span class="name">所在部门</span>
                <span class="value">{{ info.borrowDepartmentName }}</span>
            </div>
            <div class="label">
                <span class="name">借用后所在位置</span>
                <span class="value">{{ info.borrowPlace }}</span>
            </div>
            <div class="label">
                <span class="name">借用人</span>
                <span class="value">{{ info.borrowUserName }}</span>
            </div>
            <div class="label">
                <span class="name">借用原因</span>
                <span class="value">{{ info.reason }}</span>
            </div>
        </div>
        <div class="info">
            <div class="label">
                <span>借据明细</span>
            </div>
            <div class="label">
                <span class="name">数字资产ID</span>
                <span class="value">{{ info.assetId }}</span>
            </div>
            <div class="label">
                <span class="name">资产名称</span>
                <span class="value">{{ info.assetName }}</span>
            </div>
            <!-- <div class="label">
                <span class="name">品牌</span>
                <span class="value">{{ info.brand }}</span>
            </div>
            <div class="label">
                <span class="name">规格型号</span>
                <span class="value">{{ info.model }}</span>
            </div> -->
            <!-- <div class="label">
                <span class="name">资产图片</span>
                <span class="value">{{ info.assetPic }}</span>
            </div> -->
            <div class="label">
                <span class="name">借出人</span>
                <span class="value">{{ info.userName }}</span>
            </div>
            <div class="label">
                <span class="name">所在部门</span>
                <span class="value">{{ info.departmentName }}</span>
            </div>
            <div class="label">
                <span class="name">借出时间</span>
                <span class="value">{{ info.borrowTime }}</span>
            </div>
            <div class="label">
                <span class="name">借出期限</span>
                <span class="value">{{ info.indate }}</span>
            </div>
        </div>
    </div>
</template>

<script>
import AssetApi from "@/api/asset.js";
    export default {
        data() {
            return {
                info:{
                    src:'',
                    name:'燕子的借据单',
                    orderNo:'9527',
                    createTime:'2023-07-23 23:23:34',
                    dept:'研发部',
                    position:'办公室',
                    user:'燕子',
                    reason:'gengxin',
                    id:'XD342643432KJD8098',
                    assetName:'办公桌',
                    sort:'格力',
                    size:'DP012',
                    assetPic:'研发部',
                    lendUser:'张三',
                    lendDept:'研发1部',
                    lendTime:'2023-05-26 16:23:50',
                    lendEndTime:'2023-05-31 16:23:50'
                }
            }
        },
        mounted() {
            this.getInfo()
        },
        methods: {
            getInfo(){
                AssetApi.findBorrowDetail({orderId:this.$route.query.orderId}).then(res=>{
                    if(res.code == '0000'){
                        this.info = res.data
                        console.log(118,res.data)
                    }
                })
            }
        },
    }
</script>

<style lang="less" scoped>
    .promissory-detail{
        background: #f1f1f1;
        height:100vh;
        overflow-y: auto;
        .top{
            display: flex;
            justify-content: flex-start;
            background: #fff;
            height: 50px;
            line-height:50px;
            src{
                width:32px;
                height: 32px;
                border-radius: 16px;
            }
            .name{
                font-size: 14px;
                color:#101010;
                margin-left:10px;
            }
        }

        .info{
            margin:10px;
            padding: 0 15px;
            background: #fff;
            border-radius: 6px;
            color:#333;
            font-size:13px;
            .label{
                height:40px;
                line-height: 40px;
                display: flex;
                justify-content: flex-start;

                .name{
                    width:100px;
                    color:#666;
                }
            }
        }
    }
</style>